attribute vec3 a_position;
attribute vec3 a_normal;
uniform mat4 u_matrixWVP;
uniform mat4 u_matrixW;
uniform vec3 u_camPosition;
varying vec3 v_pos;
varying vec3 v_normalW;

void main(void)
{
	vec4 positionL = vec4(a_position, 1.0);
    gl_Position = u_matrixWVP * positionL;
    //v_pos = gl_Position.xyz;
    v_pos = vec3(u_matrixW * positionL).xyz;
    //v_pos.z = -v_pos.z;
    vec3 normal = vec3(u_matrixW * vec4(a_normal, 0.0)).xyz;
	v_normalW = normalize(normal);
}